package com.study.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.study.constant.ApiRouterConstant;
import com.study.convention.result.Result;
import com.study.dto.req.ShortLinkPageReqDTO;
import com.study.dto.resp.ShortLinkPageRespDTO;
import com.study.feignClient.GroupShortLinkClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author canace
 * @version 1.0
 * @description 短链接 控制类 （该部分全部都是调用shortlink-project接口）
 * @date 2024/2/15 11:36
 */

@RestController
@RequestMapping(ApiRouterConstant.BASE_API_ADMIN_V1)
@RequiredArgsConstructor
public class ShortLinkController {

    private final GroupShortLinkClient shortLinkClient;

    @GetMapping("/page")
    public Result<Page<ShortLinkPageRespDTO>> getPageShortLink(ShortLinkPageReqDTO requestParam) {
        return shortLinkClient.getPageShortLink(requestParam);
    }
}
